﻿using System;
using System.Collections.Generic;

namespace Colorful.Furniture.CommonDto
{
    /// <summary>
    ///  树级输出体
    /// </summary>
    public class TreeOutputDto<T>
    {
        public TreeOutputDto()
        {
            Children = new List<TreeOutputDto<T>>();
        }

        /// <summary>
        ///  编码
        /// </summary>
        public T Id { get; set; }

        /// <summary>
        ///  是否系统
        /// </summary>
        public bool IsSys { get; set; }

        /// <summary>
        ///  父级编码
        /// </summary>
        public Guid? ParentId { get; set; }

        /// <summary>
        ///  代码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        ///  标题
        /// </summary>
        public string Label { get; set; }

        /// <summary>
        ///  图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        ///  是否选中
        /// </summary>
        public bool IsChecked { get; set; }

        /// <summary>
        ///  禁用
        /// </summary>
        public bool Disabled { get; set; }

        /// <summary>
        ///  描述
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        ///  拓展参数
        /// </summary>
        public Dictionary<string, object> ExpandParams { get; set; }

        /// <summary>
        ///  指定节点是否为叶子节点，仅在指定了 lazy 属性的情况下生效
        /// </summary>
        public bool IsLeaf { get; set; }

        /// <summary>
        ///  子级
        /// </summary>
        public List<TreeOutputDto<T>> Children { get; set; }
    }
}